<template>
  <div class= "shop-cart">
      <Scroll class="content-cart" ref="scroll">
           <CartListItem v-for="(item,index) in $store.state.cartList" :key="index" :item="item"></CartListItem>
      </Scroll>
  </div>
</template>
<script>
import Scroll from '../../../components/common/scroll/Scroll'
import CartListItem from './CartListItem'
export default {
  name:"CartList",
  components:{
    Scroll,
    CartListItem,
  },
  activated() {
    //刷新下购物车的滚动页面
    this.$refs.scroll.refresh();
  },
  computed:{},
  methods: {
    
  },
}
</script>
<style scoped>
.shop-cart{
  height: calc(100vh - 44px - 49px);
  
}
.content-cart{
  height: 100%;
  overflow: hidden;
   

}

</style>